#ifndef RHOTABLEMODEL_H
#define RHOTABLEMODEL_H

#include <QAbstractTableModel>

#include "EmRhoModel.h"

class RhoTableModel : public QAbstractTableModel
{
public:
    explicit RhoTableModel(QObject *parent = nullptr);

    void setModelData(const QList<EmRhoModel> &datas);

    //获取行数
    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
    //获取列数
    int columnCount(const QModelIndex &parent = QModelIndex()) const override;
    //获取单元格数据
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;

public:
    QList<EmRhoModel> modelData;
};

#endif // RHOTABLEMODEL_H
